package com.twetec.cms.adapter.pc.backend.controller;

import com.twetec.cms.adapter.pc.backend.constant.RabbitMQConstants;
import com.twetec.cms.adapter.pc.backend.response.R;
import com.twetec.cms.common.util.validate.ValidateUtil;
import com.twetec.cms.model.vo.search.SearchArticlePageListVO;
import com.twetec.cms.service.search.SearchArticleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Date;

/**
 * @Author: zhaichangzheng
 * @Date: 2022/2/23 17:57 （日期和时间）
 */

@Api(tags = "接口测试模块")
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @ApiOperation(value = "检索列表", notes = "检索列表")
    @GetMapping("/mq")
    public R mq() {
        String message = "hello world";
        rabbitTemplate.convertAndSend(RabbitMQConstants.SITE_DEPLOY_FANOUT_EXCHANGE_NAME, "", message);
        return R.success();
    }
}
